package com.ruoyi.project.vehicle.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.vehicle.mapper.BinsMaintenanceInfoMapper;
import com.ruoyi.project.vehicle.domain.BinsMaintenanceInfo;
import com.ruoyi.project.vehicle.service.IBinsMaintenanceInfoService;

/**
 * 维修记录Service业务层处理
 * 
 * @author administrator
 * @date 2025-04-03
 */
@Service
public class BinsMaintenanceInfoServiceImpl implements IBinsMaintenanceInfoService 
{
    @Autowired
    private BinsMaintenanceInfoMapper binsMaintenanceInfoMapper;

    /**
     * 查询维修记录
     * 
     * @param flowNo 维修记录主键
     * @return 维修记录
     */
    @Override
    public BinsMaintenanceInfo selectBinsMaintenanceInfoByFlowNo(Integer flowNo)
    {
        return binsMaintenanceInfoMapper.selectBinsMaintenanceInfoByFlowNo(flowNo);
    }

    /**
     * 查询维修记录列表
     * 
     * @param binsMaintenanceInfo 维修记录
     * @return 维修记录
     */
    @Override
    public List<BinsMaintenanceInfo> selectBinsMaintenanceInfoList(BinsMaintenanceInfo binsMaintenanceInfo)
    {
        return binsMaintenanceInfoMapper.selectBinsMaintenanceInfoList(binsMaintenanceInfo);
    }

    /**
     * 新增维修记录
     * 
     * @param binsMaintenanceInfo 维修记录
     * @return 结果
     */
    @Override
    public int insertBinsMaintenanceInfo(BinsMaintenanceInfo binsMaintenanceInfo)
    {
        binsMaintenanceInfo.setCreateTime(DateUtils.getNowDate());
        return binsMaintenanceInfoMapper.insertBinsMaintenanceInfo(binsMaintenanceInfo);
    }

    /**
     * 修改维修记录
     * 
     * @param binsMaintenanceInfo 维修记录
     * @return 结果
     */
    @Override
    public int updateBinsMaintenanceInfo(BinsMaintenanceInfo binsMaintenanceInfo)
    {
        binsMaintenanceInfo.setUpdateTime(DateUtils.getNowDate());
        return binsMaintenanceInfoMapper.updateBinsMaintenanceInfo(binsMaintenanceInfo);
    }

    /**
     * 批量删除维修记录
     * 
     * @param flowNos 需要删除的维修记录主键
     * @return 结果
     */
    @Override
    public int deleteBinsMaintenanceInfoByFlowNos(Integer[] flowNos)
    {
        return binsMaintenanceInfoMapper.deleteBinsMaintenanceInfoByFlowNos(flowNos);
    }

    /**
     * 删除维修记录信息
     * 
     * @param flowNo 维修记录主键
     * @return 结果
     */
    @Override
    public int deleteBinsMaintenanceInfoByFlowNo(Integer flowNo)
    {
        return binsMaintenanceInfoMapper.deleteBinsMaintenanceInfoByFlowNo(flowNo);
    }
}
